package com.shopx.auth.dao.db1;


import com.shopx.auth.bean.SysUser;
import com.shopx.auth.model.SysUserModel;
import com.shopx.dal.mysql.SqlMapper;

import java.util.List;
import java.util.Map;

/**
 * SysUser
 *
 * @author lituo 2021-01-04
 */
@SqlMapper
public interface SysUserDao {
  int insertSelective(SysUser sysUser);

  int insertMap(Map<String, Object> map);

  int updateByPrimaryKeySelective(SysUser sysUser);

  int deleteByPrimaryKey(SysUser sysUser);

  void deleteBatch(List<SysUser> list);

  SysUserModel selectByPrimaryKey(SysUserModel sysUser);

  SysUserModel selectSimpleInfo(SysUser sysUser);

  int selectCount(SysUserModel sysUser);

  List<SysUserModel> selectList(SysUserModel sysUser);

  /**
   * @param sysUser
   * @return java.util.List<SysUserModel>
   * @descript 根据角色查询用户
   * @author lituo
   * @date 2021/3/12 16:45
   */
  List<SysUserModel> selectListByRoleCode(SysUserModel sysUser);

  SysUserModel officeLogin(SysUser sysUser);

  /**
   * 查询企业管理员
   *
   * @param sysUserModel
   * @return com.shopx.auth.bean.SysUser
   * @author lituo
   * @date 9:31 PM 2021/12/26
   */
  SysUser queryCpAdmin(SysUserModel sysUserModel);

  /**
   * @param sysUser
   * @return int
   * @descript 查询登录名是否存在
   * @author lituo
   * @date 2022/1/4 15:57
   */
  int selectCntByLoginName(SysUser sysUser);

  /**
   * 根据用户登录名查询用户基本信息
   *
   * @param sysUser
   * @return com.shopx.auth.model.SysUserModel
   * @auth lituo
   * @date 24.5.23 3:40 下午
   **/
  SysUserModel selectSimpleInfoByLoginName(SysUser sysUser);

  /**
   * 根据用户登录名和密码查询用户基本信息
   *
   * @param sysUser
   * @return com.shopx.auth.model.SysUserModel
   * @auth lituo
   * @date 24.5.23 3:40 下午
   **/
  SysUserModel selectSimpleInfoByLogin(SysUser sysUser);

  /**
    * @desc 根据角色类型查询
    * @author lituo
    * @date 2023/8/13 10:52 上午 @param sysUser
    * @return java.util.List<com.shopx.auth.model.SysUserModel>
    */
  List<SysUserModel> selectListByRoleType(SysUserModel sysUser);
}

